package com.hulizuofang.wol.chat.client.action;

import java.io.Serializable;

import com.gwtplatform.dispatch.shared.UnsecuredActionImpl;
import com.hulizuofang.wol.chat.client.ui.user.ChatUser;

public class SetLoginAction extends UnsecuredActionImpl<SetLoginResult> implements Serializable {
	private static final long serialVersionUID = 1L;

	private String login;

	protected SetLoginAction() {}
	
	public SetLoginAction(String login) {
		this.login = login;
	}
	
	public interface LoginWorker {
		ChatUser work(String login);
	}

	public ChatUser workLogin(LoginWorker loginWorker) {
		return loginWorker.work(login);
	}
}
